<template>
  <van-nav-bar
      title="标题"
      left-text="返回"
      right-text="按钮"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
  />
  <div class="about">
    <h1>This is an about page</h1>
  </div>
</template>
<script>
import {NavBar, Toast} from 'vant';

export default {
  components: {
    [NavBar.name]: NavBar
  },
  setup() {
    const onClickLeft = () => Toast('返回');
    const onClickRight = () => Toast('按钮');
    return {
      onClickLeft,
      onClickRight,
    };
  },
};
</script>
